package com.zzzzzz.app.topic.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zzzzzz.app.topic.NoSuchTopicException;
import com.zzzzzz.app.topic.dao.TopicDao;
import com.zzzzzz.app.topic.model.po.Topic;
import com.zzzzzz.core.exception.SystemException;

@Service
public class TopicManager {
	
	@Resource 
	private TopicDao topicDao;
	
	public Topic findById(Long id) throws NoSuchTopicException, SystemException{
		return topicDao.findById(id);
	}
	
	public void add(Topic topic) throws SystemException {
		topicDao.add(topic);
	}
	
	public void edit(Topic topic) throws SystemException {
		topicDao.edit(topic);
	}
	
}
